package co.edu.usbcali.unidades.exceptions;

public class ZMessManager extends Exception {
    private static final long serialVersionUID = 1L;
    public final static String ALL = "All ";
    public final static String ENTCHILD = "related tables(childs)";
    public final static String FOREIGNDATA = "foreign classes data: ";
    public static String ENTITY_SUCCESFULLYSAVED = "Guardado exitosamente";
    public static String ENTITY_SUCCESFULLYDELETED = "Entity succesfully deleted";
    public static String ENTITY_SUCCESFULLYMODIFIED = "Actualizado correctamente";
    public static String ENTITY_WITHSAMEKEY = "Ya exixste un item con esa información";
    public static String ENTITY_NOENTITYTOUPDATE = "No Existe Ese Registro, No Se Puede Actualizar ";

    public ZMessManager() {
    }

    public ZMessManager(String exception) {
        super(exception);
    }

    public class NotValidFieldException extends ZMessManager {
        private static final long serialVersionUID = 1L;

        public NotValidFieldException(String info) {
            super("El valor para el campo: \"" + info + "\" no es valido");
        }
    }

    public class EmptyFieldException extends ZMessManager {
        private static final long serialVersionUID = 1L;

        public EmptyFieldException(String info) {
            super("El Valor para el campo: \"" + info +
                "\" no puede estar vacio");
        }
    }

    public class NotValidFormatException extends ZMessManager {
        private static final long serialVersionUID = 1L;

        public NotValidFormatException(String info) {
            super("El formato o el tamaño del campo: \"" + info +
                "\" no es valido");
        }
    }
    
    public class SoloLetrasException extends ZMessManager{
    	private static final long serialVersionUID = 1L;
    	
    	public SoloLetrasException(String info){
    		super("El campo : \"" + info +
            "\" no contiene solo letras");
    	}
    }
    
    public class UsuPassIncorrecto extends ZMessManager{
    	private static final long serialVersionUID = 1L;
    	
    	public UsuPassIncorrecto(){
    		super("Usuario o Password incorrectos");
    	}
    }
    
    public class CorreoException extends ZMessManager{
    	private static final long serialVersionUID = 1L;
    	
    	public CorreoException(){
    		super("El formato de email electronico no es valido");
    	}
    }

    public class DeletingException extends ZMessManager {
        private static final long serialVersionUID = 1L;

        public DeletingException(String info) {
            super("The Entity you are trying to delete " +
                "may have related information, " +
                "please before trying again, " +
                "check the data on the entity, \"" + info + "\"");
        }
    }

    public class ForeignException extends ZMessManager {
        private static final long serialVersionUID = 1L;

        public ForeignException(String info) {
            super("Seleccione un dato para \"" + info + "\"");
        }
    }

    public class GettingException extends ZMessManager {
        private static final long serialVersionUID = 1L;

        public GettingException(String info) {
            super("There was an exception getting " + info);
        }
    }

    public class FindingException extends ZMessManager {
        private static final long serialVersionUID = 1L;

        public FindingException(String info) {
            super("No hay " + info + " que con esa descripción");
        }
    }
}
